﻿using Smile.Imaging;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Smile.Mvvm.Service
{
    /// <summary>Service interface which manage operations with media storage.</summary>
    public interface IMediaStorageService
    {
        // @Properties
        object CameraCapture { get; }

        // @Members function
        /// <summary>Launch the camera capture feature (Asynchronous).</summary>
        ///
        /// <returns>The Image captured.</returns>
        Task<IImage> CameraCaptureAsync();

        /// <summary>Choose a picture into the device (Asynchronous).</summary>
        ///
        /// <returns>The choosen image.</returns>
        Task<IImage> PhotoChooseAsync();

        /// <summary>Saves a picture (Asynchronous).</summary>
        ///
        /// <param name="title">    The title.</param>
        /// <param name="byteArray">Array of bytes.</param>
        ///
        /// <returns>The operation result.</returns>
        Task<bool> SavePictureAsync(string title, byte[] byteArray);

        /// <summary>Saves a picture (Asynchronous).</summary>
        ///
        /// <param name="title">    The title.</param>
        /// <param name="uriString">The URI string.</param>
        ///
        /// <returns>The operation result.</returns>
        Task<bool> SavePictureAsync(string title, string uriString);

        /// <summary>Saves a picture (Asynchronous).</summary>
        ///
        /// <param name="title">The title.</param>
        /// <param name="uri">  URI of the document.</param>
        ///
        /// <returns>The operation result.</returns>
        Task<bool> SavePictureAsync(string title, Uri uri);
    }
}
